package com.app.base.service.file.controller;

import com.app.base.service.core.personnel.entity.PersonInfo;
import com.app.base.service.file.service.ExportExcelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@Api(tags = "文件管理")
@Controller
@RequestMapping("exportExcelController")
public class ExportExcelController {

    @Resource
    private ExportExcelService exportExcelService;

    @GetMapping("personnel")
    @ApiOperation("导出人才库")
    public void reportPersonnelExcel(HttpServletResponse response,
                                     @RequestParam(value = "startTime",required = false)String startTime,
                                     @RequestParam(value = "endTime",required = false)String endTime,
                                     @RequestParam(value = "educationStr",required = false)String educationStr,
                                     PersonInfo person){
         exportExcelService.reportPersonnelExcel(response,educationStr,startTime,endTime,person);
    }


}
